//
//  Map.m
//  Tank For IPhone
//
//  Created by 奕 朱 on 11-3-8.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "Map.h"

@interface Map(Private)

- (void) toElements;

@end

 
@implementation Map
@synthesize models;
@synthesize mapElements;

- (Map *) init:(NSMutableArray *)_models {
	[self init];
	self.models = _models;
	[self toElements];
	return self;
}
 
- (void) draw:(CGContextRef)context {
	
}

- (void) toElements {

	//if (nil != models) {
//		
//		IMapElement singleLayerObstacels[][] = new IMapElement[sizeof(models)][];
//		
//	}
//	
//	NSLog(@"In Map, models is null");
	
	if (nil != models) {
		
		NSMutableArray *singleLayerObstacles = [[NSMutableArray alloc] initWithCapacity: [models count]];
		NSMutableArray *multipleLayerObstacles = [[NSMutableArray alloc] initWithCapacity: [models count]];
		
		for (int i = 0; i < [models count]; i ++) {
			for (int j = 0; j < [[models objectAtIndex:i] count]; i ++) {
				NSLog(@"%d", [[models objectAtIndex:i] objectAtIndex:j]);
			}
			NSLog(@"\r\n");
		}
		
	}
	
}

- (void) dealloc {
	
}



@end
